table.RELATION_DROP Function

Syntax

V Relation_Drop(P Table)

Arguments

Table

A pointer to a table that is a child to parent table <TBL> in a set.

Description

Remove a relation from a table.

Discussion

The <TBL>.RELATION_DROP() method removes the link between a parent table (referenced by the object pointer, <TBL>) and a child table (referenced by the object pointer, <Child_Table> ) in a set design. If the child table of this link is itself related to one or more child tables, these child links are also removed.

Example

parent = table.open("c:\a5\a_sports\inv_head.dbf")
child_tbl = table.open("c:\a5\a_sports\inv_item.dbf")
relation.link_type = LINK_MANY
child_index = child_tbl.index_get("inv_no")
relation.index_child = child_index
relation.order_parent = "inv_no"
relation.ref_integrity = 1
parent.relation_add(child)
parent.set_create("c:\a5\a_sports\myset.set")
parent.relation_drop(child)

See Also